<?php
/**
 * DepartmentsController.php
 *
 * @copyright   2023 thingsworld.com.cn - All Rights Reserved
 * @link        http://thingsworld.com.cn/
 * @author      stiffer.chen <chenl@thingsworld.com.cn>
 * @created     2023-08-26 16:55:05
 * @modified    2023-08-26 16:55:05
 *
 */

namespace App\Http\Controllers;

use App\Repositories\DepartmentRepo;
use Illuminate\Http\Request;

class DepartmentsController extends BaseModuleController
{
    public function all_child(Request $request, $id)
    {
        try {
            $child = DepartmentRepo::getAllChild($id);
            return message('获取成功', true, $child);
        } catch (\Exception $e) {
            return message($e->getMessage(), false);
        }
    }
}